using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToRaster
{
    /// <summary>
    /// <para>DEM to Raster</para>
    /// <para>Converts a digital elevation model (DEM) in a United States Geological Survey (USGS) format to a raster dataset.</para>
    /// <para>将美国地质调查局 （USGS） 格式的数字高程模型 （DEM） 转换为栅格数据集。</para>
    /// </summary>    
    [DisplayName("DEM to Raster")]
    public class DEMToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DEMToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dem_file">
        /// <para>Input USGS DEM file</para>
        /// <para>The input USGS DEM file. The DEM must be standard USGS 7.5 minute, 1 degree, or any other file in the USGS DEM format. The DEM may be in either fixed or variable record-length format.</para>
        /// <para>输入 USGS DEM 文件。DEM 必须是标准 USGS 7.5 分钟、1 度或 USGS DEM 格式的任何其他文件。DEM 可以是固定的，也可以是可变的记录长度格式。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster dataset to be created.</para>
        ///   <para>If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的输出栅格数据集。</para>
        ///   <para>如果输出栅格不会保存到地理数据库中，请为 TIFF 文件格式指定 .tif 。CRF 表示 CRF 文件格式，.img 表示 ERDAS IMAGINE 文件格式，或者 Esri Grid 栅格格式没有扩展名。</para>
        /// </xdoc></para>
        /// </param>
        public DEMToRaster(object _in_dem_file, object _out_raster)
        {
            this._in_dem_file = _in_dem_file;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "DEM to Raster";

        public override string CallName => "conversion.DEMToRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "pyramid", "rasterStatistics", "scratchWorkspace", "tileSize"];

        public override object[] ParameterInfo => [_in_dem_file, _out_raster, _data_type.GetGPValue(), _z_factor];

        /// <summary>
        /// <para>Input USGS DEM file</para>
        /// <para>The input USGS DEM file. The DEM must be standard USGS 7.5 minute, 1 degree, or any other file in the USGS DEM format. The DEM may be in either fixed or variable record-length format.</para>
        /// <para>输入 USGS DEM 文件。DEM 必须是标准 USGS 7.5 分钟、1 度或 USGS DEM 格式的任何其他文件。DEM 可以是固定的，也可以是可变的记录长度格式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input USGS DEM file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dem_file { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster dataset to be created.</para>
        ///   <para>If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的输出栅格数据集。</para>
        ///   <para>如果输出栅格不会保存到地理数据库中，请为 TIFF 文件格式指定 .tif 。CRF 表示 CRF 文件格式，.img 表示 ERDAS IMAGINE 文件格式，或者 Esri Grid 栅格格式没有扩展名。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output data type</para>
        /// <para><xdoc>
        ///   <para>Data type of the output raster dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Integer—An integer raster dataset will be created.</bullet_item><para/>
        ///     <bullet_item>Float—A floating-point raster dataset will be created. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格数据集的数据类型。</para>
        ///   <bulletList>
        ///     <bullet_item>整数—将创建整数栅格数据集。</bullet_item><para/>
        ///     <bullet_item>浮点数—将创建浮点栅格数据集。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output data type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._FLOAT;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Float</para>
            /// <para>Float—A floating-point raster dataset will be created. This is the default.</para>
            /// <para>浮点数—将创建浮点栅格数据集。这是默认设置。</para>
            /// </summary>
            [Description("Float")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—An integer raster dataset will be created.</para>
            /// <para>整数—将创建整数栅格数据集。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INTEGER")]
            _INTEGER,

        }

        /// <summary>
        /// <para>Z factor</para>
        /// <para><xdoc>
        ///   <para>The number of ground x,y units in one surface z unit.</para>
        ///   <para>The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.</para>
        ///   <para>If the x,y units and z units are in the same units of measure, the z-factor is 1. This is the default.</para>
        ///   <para>If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个曲面 z 单位中的地面 x，y 单位数。</para>
        ///   <para>当 z 单位与输入曲面的 x，y 单位不同时，z 因子会调整它们的测量单位。在计算最终输出曲面时，输入曲面的 z 值乘以 z 因子。</para>
        ///   <para>如果 x，y 单位和 z 单位采用相同的测量单位，则 z 因子为 1。这是默认设置。</para>
        ///   <para>如果 x，y 单位和 z 单位采用不同的测量单位，则必须将 z 因子设置为适当的因子，否则结果将不正确。例如，如果 z 单位是英尺，x，y 单位是米，则使用 z 因子 0.3048 将 z 单位从英尺转换为米（1 英尺 = 0.3048 米）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        public DEMToRaster SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object pyramid = null, object rasterStatistics = null, object scratchWorkspace = null, double[] tileSize = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, pyramid: pyramid, rasterStatistics: rasterStatistics, scratchWorkspace: scratchWorkspace, tileSize: tileSize);
            return this;
        }

    }

}